'''
Created on 27/apr/09

@author: Riccardo Cagnasso
'''
import os

from Controller.AuthHandler import AuthHandler
from Datastore.Ticket.Ticket import Ticket

class ViewTicket(AuthHandler):
    '''
    This is the page that displays a ticket
    '''
    def get(self):
        super(ViewTicket,self).get()
        key=self.request.get('id')
        ticket = Ticket.get(key)
        template_vars={
                        'ticket':ticket
                       }
                #self.response.out.write( entry.key() )
                
        path = os.path.join(os.path.dirname(__file__), '..','templates','showTicket.html')
        self.response.out.write(self.displayTemplate(path, template_vars))
    
        